home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / prog / proxy14.arj / NODUP.PRX < prev    next >
Text File  |  1992-11-24  |  444b  |  13 lines

  1. ch1=channel();
  2. ch2=channel();
  3. eos="eos";
  4. task suppress(inp,out;x,y) {inp?x;if(x==eos) {out!x;skip;}
  5.   while (true) {inp?y;if(y==eos) {out! x; out!y;skip;}
  6.   if(x!=y) {out!x;x=y;} }};
  7. task source(out) {out!1;out!2;out!2;out!3;out!4;
  8.                   out!4;out!4;out!eos;};
  9. task sink(inp;msg) {inp?msg;while(msg!=eos) {print msg;inp?msg;}};
  10. task main() {start source(ch1);start suppress(ch1,ch2);
  11.              start sink(ch2);};
  12. end
  13.